package cn.zbh.basic.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 返回json格式的结果
 */
@Data

public  class AjaxResult {

    private Boolean success=true;
    private  String msg="操作成功";
    private  Object resultObj;

    public AjaxResult(boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    public AjaxResult() {
    }


    public static  AjaxResult me(){
        return new AjaxResult();
    }

    /*public void setSuccess(boolean success) {
        this.success=false;
        this.success = success;
    }*/



    public AjaxResult setMsg(String msg) {
        this.success=false;
        this.msg=msg;

        return  this;
    }

    public AjaxResult setResultObj(Object msg) {
        this.resultObj=msg;

        return  this;
    }
}
